<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://myTag.test.SimpleTag1" prefix="tag" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<%
	request.setAttribute("basePath", basePath);
	request.setAttribute("list", new String[]{"sdfasdf","sdfdsf","fdgdsfasdf","lkjlhoih123"});	
	 %>
  </head>
  
  <body>
    <hr>
    <h2>test1</h2>
    <tag:test1 />
    <hr>
    <h2>test1-2</h2>
    <tag:test1>sdfasdffsdddddd</tag:test1>
    <hr>
    <h2>test2</h2>
    <tag:test2>
    	now:<%=new Date() %>-->${basePath }<br>
    	<c:forEach items="${list }" var="str">${str }<br></c:forEach>
    </tag:test2>
    <hr>
    <h2>test3</h2>
    <tag:test3>
    	[{"姓名":"name"},{"性别":"sex"}]
    </tag:test3>
  </body>
</html>
